package com.hangim.pce.common.search.repository;

import com.hangim.pce.common.search.domain.ESSymptom;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.annotations.Query;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

public interface ESSymptomRepository extends ElasticsearchRepository<ESSymptom, Long> {
    @Query("{\"query_string\":{\"query\":\"?0\",\"fields\":[\"name\",\"code\",\"spell\",\"nameAlias\"]}}")
    Page<ESSymptom> findSymptomForPage(String q, Pageable pageable);

}
